﻿using System;

namespace Blog.TemplateEngine
{
    public class Token
    {
        TokenType mType;
        string mContents;

        public Token(TokenType type, string contents)
        {
            mType = type;
            mContents = contents;
        }

        public TokenType Type
        {
            get { return mType; }
        }

        public string Content
        {
            get { return mContents; }
        }

        public override string ToString()
        {
            return string.Format("<{0}: \"{1}\">", mType.ToString(), mContents.Substring(0, 20).Replace(Environment.NewLine, ""));
        }
    }
}
